package cn.edu.nyist.integration.mapper;

import cn.edu.nyist.integration.entity.Integration;
import cn.edu.nyist.integration.vo.UserCreditVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface IntegrationMapper {

    int deleteByPrimaryKey(Long integrationId);

    int insert(Integration record);

    int insertSelective(Integration record);

    Integration selectByPrimaryKey(Long integrationId);

    int updateByPrimaryKeySelective(Integration record);

    int updateByPrimaryKey(Integration record);

    int updateTotalScore(@Param("newScore") Integer newScore, @Param("userId") Long userId);

    Integration selectByUserId(Long userId);

    List<UserCreditVO> selectRank(String username);


    UserCreditVO queryRankByUserId(Long userId);
}